<template>
  <div>
    <h2>父组件</h2>
    <p>父组件中的 isExpanded: {{ isExpanded }}</p>
    <child-component :is-expanded.sync="isExpanded" />
    <!-- 等价于 -->
    <child-component
      :is-expanded="isExpanded"
      @update:isExpanded="isExpanded = $event"
    />
  </div>
</template>

<script>
import ChildComponent from './ChildComponent.vue'
export default {
  name: 'page-day21',
  components: { ChildComponent },
  data() {
    return {
      isExpanded: false
    }
  }
}
</script>

<style lang="scss" scoped></style>
